package cn.rdq.iknessplatform.controller;

import cn.rdq.api.dto.BlogCommentInfoDto;
import cn.rdq.common.CommonResult;
import cn.rdq.iknessplatform.service.BlogCommentService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api
@RequestMapping("/blog-comment")
public class BlogCommentController {

    @Autowired
    private BlogCommentService blogCommentService;

    @GetMapping("/replys")
    public CommonResult relys(Long rootParentId) {
        List<BlogCommentInfoDto> replys = blogCommentService.replys(rootParentId);
        return CommonResult.successObj(replys);
    }

}
